package com.bt.design.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.bt.design.service.IMapperMybatisService;
import com.bt.design.service.ITaskInfoJpaService;

/**
 * mybatis两种方式配置
 * 
 * @author Mark
 *
 */
@Controller
public class MybatisTestController {
	
	@Resource
	private IMapperMybatisService mapperMybatisService;
	
	@Resource
	private ITaskInfoJpaService taskInfoJpaService;
	
	@RequestMapping("/taskInfo") 
	public String taskInfo(Model model) { 
		model.addAttribute("taskInfo", mapperMybatisService.findTaskInfoList()); 
		return "ftl/taskInfo"; 
	}
	
	@RequestMapping("/") 
	public String bookStrap(Model model) { 
		model.addAttribute("taskInfo", taskInfoJpaService.findTaskInfoList()); 
		return "ftl/bookStrap"; 
	}
}
